import request from '@/utils/request'

// 查询产品工艺列表
export function listTec(query) {
  return request({
    url: '/mes/tec/proTecList',
    method: 'get',
    params: query
  })
}

// 查询产品工艺详细
export function getTec(id) {
  return request({
    url: '/mes/tec/getDetals' ,
    method: 'get',
    params: id
  })
}

// 新增产品工艺
export function addTec(data) {
  return request({
    url: '/mes/tec/savetec',
    method: 'post',
    data: data
  })
}

// 修改产品工艺
export function updateTec(data) {
  return request({
    url: '/mes/tec/edittec',
    method: 'put',
    data: data
  })
}

// 删除产品工艺
export function delTec(id) {
  return request({
    url: '/mes/tec/' + id,
    method: 'delete'
  })
}

//根据产品Id查找工艺信息
export function getTecProceByProId(id) {
  return request({
    url: '/mes/proinfo/getTecProceByProId',
    method: 'get',
    params:id
  })
}
